Electronic Control Device and Method for Setting Control Data

ABSTRACT

An electronic control device comprises an electronically rewritable nonvolatile memory which has first storage area and second storage area. The first storage area stores a control program in which control data is embedded, and the second storage area stores a plurality of control data usable for the control program and a rewrite program for rewriting the control data of the control program to one piece of control data selected from the plurality of control data.

TECHNICAL FIELD

The present invention relates to an electronic control device and amethod for setting control data.

BACKGROUND ART

A nonvolatile memory of electronic control devices mounted inautomobiles stores a control program that differs depending on eachmodel. Also, in such electronic control device, operations of a targetcomponent are changed by control data (control constant) for a commoncontrol program, as disclosed in JP S62-67422 A (Patent Document 1).Accordingly, electronic control devices mounted in automobiles have manyvariations (component numbers) depending on each type of controlprograms and control data.

REFERENCE DOCUMENT LIST Patent Document

-   Patent Document 1: JP S62-67422 A

SUMMARY OF THE INVENTION Problem to be Solved by the Invention

In assembly lines of automobiles, electronic control devices that arecompatible with the specifications, for example, of each automobile needto be mounted. However, since there are many variations of electroniccontrol devices as described above, enormous efforts have been made tomanage these variations.

Accordingly, an object of the present invention is to provide anelectronic control device and a method for setting control data that canreduce the effort required to manage the variations of electroniccontrol devices.

Means for Solving the Problem

To achieve the object, the present invention provides an electroniccontrol device including an electronically rewritable nonvolatile memorywhich has the first and second storage areas. The first storage areastores a control program in which control data is embedded. The secondstorage area stores a plurality of control data usable for the controlprogram and a rewrite program for rewriting the control data of thecontrol program. The electronic control device rewrites the control dataof the control program to one piece of control data selected from theplurality of control data by the rewrite program.

Effects of the Invention

According to the present invention, since it is only necessary toprepare electronic control devices that differ only in the controlprogram, it is possible to reduce the effort required to managevariations of electronic control devices.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an internal configuration diagram illustrating an example ofan electronic control device.

FIG. 2 illustrates two storage areas allocated in a code flash memory.

FIG. 3 illustrates the data structure of the code flash memory.

FIG. 4 is a schematic view for illustrating a system for rewritingcontrol data of a control program.

FIG. 5 is a flowchart illustrating an example of a control datarewriting processing.

FIG. 6 illustrates a state in which the control data of the controlprogram is rewritten.

FIG. 7 illustrates a state in which a storage area is deleted afterrewriting the control data.

FIG. 8 illustrates another example of a plurality of control data storedin the storage area in an active state.

FIG. 9 is a schematic view of a system for updating the control programwhile a vehicle is driven.

FIG. 10 is a diagram for illustrating a method for updating the controlprogram.

FIG. 11 illustrates another example of storage areas allocated in thecode flash memory.

FIG. 12 is a flowchart illustrating an example of the proceduresfollowed by a worker in an assembly line of automobiles.

MODE FOR CARRYING OUT THE INVENTION

Hereinafter, an embodiment for implementing the present invention willbe described in detail with reference to the accompanying drawings.

FIG. 1 illustrates an example of an electronic control device 100 towhich the present invention is applied. Electronic control device 100 ismounted in vehicles such as automobiles.

Electronic control device 100 includes a processor 110, a code flashmemory 120, a data flash memory 130, a Random Access Memory (RAM) 140,an input-output circuit 150, a communication circuit 160, and aninternal bus 170 for connecting these components in a mutuallycommunicable manner. Here, code flash memory 120 is an example of thenonvolatile memory. FIG. 1 illustrates only one electronic controldevice 100, but a vehicle may have a plurality of electronic controldevices connected to a Controller Area Network (CAN) or other in-vehiclenetworks.

Processor 110 is hardware for executing an instruction set (e.g., datatransfer, computation, processing, control, and management) written in aprogram. The processor 110 includes an arithmetic and logic unit, aregister for storing instructions and information therein, and aperipheral circuit, for example. Code flash memory 120 includes anelectronically rewritable nonvolatile memory, and stores therein controlprograms for controlling an engine, an automatic transmission, and afuel injector, for example. Data flash memory 130 includes anelectronically rewritable nonvolatile memory, and stores a learningvalue or other data, for example. RAM 140 includes a volatile memory inwhich data is erased when the power supply is interrupted. The RAM 140provides a temporal storage area for processor 110.

Input-output circuit 150 includes, for example, an A/D converter, a D/Aconverter, and a D/D converter and provides a function of inputting andoutputting an analog signal and a digital signal to and from an externaldevice. Communication circuit 160 includes a CAN transceiver, forexample, and provides a function of connecting to the in-vehiclenetwork. Internal bus 170 is a path for exchanging data between devices.The internal bus 170 includes an address bus for transferring anaddress, a data bus for transferring data, and a control bus forexchanging information about the actual timing to input or output datavia the address bus or data bus, and control information therefor.

Communication circuit 160 of electronic control device 100 is connectedto a wireless transceiver 190 for wireless communication with theoutside via a gateway 180. Gateway 180 provides a function of convertingthe protocol of data transmitted from the outside into the protocol thatcan be processed by communication circuit 160, and also a function ofconverting the protocol of data processed at communication circuit 160into the protocol that can be processed the outside. When electroniccontrol device 100 is not required to wirelessly communicate with theoutside, gateway 180 and wireless transceiver 190 need not be provided.

As illustrated in FIG. 2, a bank A and a bank B are allocated in codeflash memory 120 in advance as an example of two storage areasexclusively switchable between an active state and an inactive state.The bank in the active state and the bank in the inactive state will behereinafter referred to as “active ROM” and “inactive ROM”,respectively. The inactive ROM and the active ROM are examples of thefirst storage area and the second storage area, respectively.

In an initial state of electronic control device 100, as illustrated inFIG. 3, a control program for controlling a target component ofelectronic control device 100 is stored in the inactive ROM. The controlprogram contains control data embedded therein for defining operationsof a target component as illustrated by a dashed line. Here, the controldata may be the one compatible with a model of the largest number amongmultiple models to be equipped with the same electronic control device100, for example. In an example illustrated in FIG. 3, one controlprogram is stored in the inactive ROM, but two or more control programsfor controlling target components can be stored in the inactive ROM.

Also, in an initial state of electronic control device 100, asillustrated in FIG. 3, the active ROM stores a plurality of control dataof 1 to N (N: natural number greater than or equal to 2) usable for thecontrol program stored in the inactive ROM, and a rewrite program forrewriting the control data embedded in the control program. The rewriteprogram selects, according to vehicle information (information) providedfrom the outside, one piece of control data compatible with the vehicleinformation from the plurality of control data of 1 to N and rewritesthe control data embedded in the control program. Here, the active ROMin which the rewrite program and the plurality of control data arestored can originally be used for the purpose of storage areas to writetherein various information used only in a market, such as failureinformation or learning values.

In the example illustrated in FIG. 3, the active ROM stores the controldata of 1 to N that correspond to one control program, and a rewriteprogram. If two or more control programs are stored in the inactive ROM,control data and rewrite programs corresponding to each control programmay be stored. Also, the number of control data is not limited to N, butmay be any number that can be used in a control program.

When setting the control data compatible with the destination or optionsof an automobile for example, before assembling such electronic controldevice 100 to the automobile, electronic control device 100 is removablyconnected to an external device 300 that is operated by a worker via anetwork cable 200 such as CAN, serial communication, Local InterconnectNetwork (LIN), or FlexRay (registered trademark) as illustrated in FIG.4. External device 300 comprises a personal computer equipped with aninput device and a display device, for example. The external device 300stores, in a storage thereof such as a hard disk drive, at least aprogram for inputting the vehicle information of automobiles.Furthermore, upon being connected to external device 300, electroniccontrol device 100 boots up by receiving the power supply from externaldevice 300.

FIG. 5 illustrates an example of a control data rewriting processingexecuted by processor 110 of electronic control device 100 whenelectronic control device 100 boots up. Processor 110 of electroniccontrol device 100 performs the control data rewriting processingaccording to the rewrite program stored in the active ROM of code flashmemory 120.

In Step 1 (abbreviated as “S1” in FIG. 5, the same applies to the otherSteps below), processor 110 of electronic control device 100 obtains thevehicle information from external device 300. That is, processor 110obtains the vehicle information of a vehicle to be equipped withelectronic control device 100 that is input by a worker at externaldevice 300 connected to electronic control device 100, specifically thedestination or options of an automobile for example.

In Step 2, processor 110 of electronic control device 100 refers to atable (not shown) in which the vehicle information and the control dataare associated with each other, for example and selects one piece ofcontrol data compatible with the vehicle information obtained fromexternal device 300. This table can be embedded as a part of the rewriteprogram. Here, external device 300 may be configured to provideinformation that can identify the control data, as the vehicleinformation.

In Step 3, processor 110 of electronic control device 100 determineswhether the control data of the control program stored in the inactiveROM is required to be rewritten. Specifically, by determining whetherthe control data compatible with the vehicle information matches thecontrol data of the control program, processor 110 of electronic controldevice 100 determines whether the control data of the control program isrequired to be rewritten. If it is determined that the control data ofthe control program is required to be rewritten, that is, the controldata compatible with the vehicle information does not match the controldata of the control program, processor 110 of electronic control device100 advances the processing to Step 4 (Yes). On the other hand, if it isdetermined that the control data of the control program is not requiredto be rewritten, that is, the control data compatible with the vehicleinformation matches the control data of the control program, processor110 of electronic control device 100 advances the processing to Step 5(No).

In Step 4, processor 110 of electronic control device 100 rewrites thecontrol data of the control program stored in the inactive ROM to thecontrol program compatible with the vehicle information. Here, if it isdetermined by using, for example, Cyclic Redundancy Check (CRC) orchecksum, that rewriting of the control data has not been successfullycompleted, processor 110 of electronic control device 100 can executerewriting of the control data again. Also, processor 110 of electroniccontrol device 100 may be configured such that if rewriting of thecontrol data has not been successfully completed even after consecutivepredetermined times of executing rewriting of the control data, theprocessor notifies that a failure has occurred in electronic controldevice 100 without performing the subsequent processing.

In Step 5, processor 110 of electronic control device 100 switches theactive ROM to the inactive ROM and also switches the inactive ROM to theactive ROM. Thus, processor 110 of electronic control device 100 canoperate a rewrite program and a plurality of control data stored in theinactive ROM appropriately.

In Step 6, processor 110 of electronic control device 100 deletes therewrite program and the plurality of control data stored in the inactiveROM, that is, initializes the inactive ROM. Accordingly, electroniccontrol device 100 can then write, for example, failure information inthe inactive ROM of code flash memory 120 for storage. When there is asufficient storage area left in the inactive ROM of code flash memory120, the rewrite program and the plurality of control data may bemaintained without deletion.

According to such electronic control device 100, when electronic controldevice 100 boots up by being connected to external device 300, therewrite program stored in the active ROM is executed. The rewriteprogram obtains the vehicle information from external device 300 toselect one piece of control data compatible with the vehicle informationfrom a plurality of control data stored in the active ROM, asillustrated in FIG. 6. In the illustrated example, control data 2 isselected from the plurality of control data of 1 to N, but control data2 need not necessarily be selected.

The rewrite program determines, by determining whether the control dataof the control program stored in the inactive ROM matches the controldata compatible with the vehicle information, whether the control dataof the control program is required to be rewritten. If it is determinedthat the control data is required to be rewritten, the rewrite programrewrites the control data of the control program stored in the inactiveROM to the control data compatible with the vehicle information (forexample, control data 2) as illustrated in FIG. 6. Also, if it isdetermined that the control data is not required to be rewritten, or ifrewriting of the control data of the control program is completed, therewrite program switches the active ROM to the inactive ROM and alsoswitches the inactive ROM to the active ROM. The rewrite program thendeletes the rewrite program and the plurality of control data stored inthe active ROM to initialize the active ROM as illustrated in FIG. 7 andprepares for writing of failure information, for example.

It is thus possible, with regard to electronic control devices 100 thatdiffer only in the control program to rewrite the control data embeddedin the control program to the control data compatible with thedestinations or options for example, by using the rewrite program andthe plurality of control data stored in the active ROM. Regardingtransfer from an assembly line of electronic control devices 100 to anassembly line of automobiles, since it is just required to manageelectronic control devices 100 that differ only in the control program,the efforts required to manage the variations of electronic controldevices can be reduced. Furthermore, since a rewrite program and aplurality of control data are stored by using a storage area that isoriginally for writing failure information therein for example, theunused storage area of code flash memory 120 can be effectivelyutilized.

A specific example will be described below. It is assumed that there are26 models of automobiles and 4 types of control data for each model, forexample. In this case, electronic control devices 100 have 26 models×4types=104 variations in the conventional techniques. On the other hand,electronic control devices 100 according to the present embodiment havejust 26 variations because it is not necessary to manage the controldata for each model. Accordingly, the number of variations of electroniccontrol devices 100 is reduced from 104 to 26, thereby reducing theefforts required to manage these variations. Furthermore, with thereduced effort for the management, costs of managing electronic controldevices 100 also decrease, which can improve the company'sprofitability, for example.

Rewriting of the control data embedded in the control program is notlimited to before assembling electronic control device 100 in anautomobile, but may be after assembling electronic control device 100 inan automobile. In this case, it is possible to obtain the vehicleinformation of an automobile to which electronic control device 100 isassembled by using a multi-display mounted on the automobile or a toolconnected to an On Board Diagnosis second generation (OBD2) port, forexample.

Also, the active ROM of code flash memory 120 may store, other than aplurality of control data of 1 to N usable for the control programstored in the inactive ROM, control data differences of 1 to N thatindicate differences from the control data embedded in the controlprogram as illustrated in FIG. 8. In this case, the control datadifferences compatible with the vehicle information may be used to patchthe control data embedded in the control program for rewriting thiscontrol data. In this way, the storage capacity required to store aplurality of control data is reduced, which allows many control data tobe stored even if the capacity of the active ROM of code flash memory120 is small.

The storage area in which the rewrite program and the plurality ofcontrol data were stored can be used, after initialization, to updatethe control program by Over The Air (OTA) using wireless communicationwhile a vehicle is driven, for example.

FIG. 9 illustrates an example of a system for updating the controlprogram of electronic control device 100 mounted on a vehicle VH by OTA.An update program is stored in a server SVR of an OTA center CTR, anddelivered to vehicle VH through wireless communication from a basestation BS connected to OTA center CTR. The update program delivered tovehicle VH is sent to electronic control device 100 via wirelesstransceiver 190, gateway 180, and an in-vehicle network of vehicle VHand written in the inactive ROM of code flash memory 120 of electroniccontrol device 100. Then, by switching the active ROM to the inactiveROM and also switching the inactive ROM to the active ROM at apredetermined timing such as a timing to reboot electronic controldevice 100, the updated control program can be used to control a targetcomponent.

An example of the control program update processing will be describedbelow. In an initial state of electronic control device 100, asillustrated in FIG. 10, a control program of Rev. 1.0 is stored in theactive ROM, and the inactive ROM is not used. In this initial state, anupdate program of Rev. 2.0 is written in the inactive ROM, and theactive ROM is switched to the inactive ROM and also the inactive ROM isswitched to the active ROM at a predetermined timing. Accordingly,electronic control device 100 can execute afterward the control programof Rev. 2.0 written in the active ROM, thereby performing such controlthat a function is added or a bug is fixed, for example.

When further updating the control program of Rev. 2.0 written in theactive ROM, an update program of Rev. 3.0 is written in the inactiveROM, and the active ROM is switched to the inactive ROM and also theinactive ROM is switched to the active ROM at a predetermined timing. Inthis way, the control program can be updated even when vehicle VH isrunning.

Code flash memory 120 may have, other than the allocated two storageareas that are exclusively switchable between an active state and aninactive state, the first storage area for storing a control program inwhich control data is embedded, and the second storage area for storinga rewrite program and a plurality of control data of 1 to N, asillustrated in FIG. 11. In the illustrated example, code flash memory120 only has first and second storage areas, but it may further have astorage area for storing any data.

FIG. 12 illustrates the outline of procedures for rewriting the controldata of electronic control device 100 in an assembly line ofautomobiles. In the following example, electronic control device 100 isassembled to an automobile, and work instructions are given using themulti-display provided in the automobile. Work instructions may also begiven, for example, by connecting a tool to the OBD2 port or by OTA.Also, when rewriting the control data before assembling electroniccontrol device 100 to an automobile, work instructions can be given byconnecting a tool to the OBD2 port, for example.

In Step 11, a worker determines whether a rewrite confirmation screen,for example, “Execute Rewriting.” is displayed in the multi-display. Ifit is determined that the rewrite confirmation screen is displayed, theworker proceeds to Step 12 (Yes). On the other hand, if it is determinedthat the rewrite confirmation screen is not displayed, the workerproceeds to Step 14 (No). Here, the case in which the rewriteconfirmation screen is not displayed is assumed to occur when therewrite program executed by booting up of electronic control device 100determines that rewriting of the control data is not necessary.

In Step 12, the worker gives an instruction to start rewriting of thecontrol data via a start instruction screen displayed on themulti-display, for example, “Rewrite Start OK? Y/N”. When theinstruction to start rewriting of the control data is given, electroniccontrol device 100 rewrites the control data of the control programstored in the inactive ROM by the processing described above. When aninstruction not to start rewriting of the control data is given, theworker subsequently terminates the procedures for rewriting the controldata.

In Step 13, the worker determines whether a rewrite completionconfirmation screen, for example, “Rewriting Completed. Please Turn Offthe Ignition.”, is displayed on the multi-display. If it is determinedthat the rewrite completion confirmation screen is displayed, the workerproceeds to Step 14 (Yes). If it is determined that the rewritecompletion confirmation screen is not displayed, the worker waits untilthe rewrite completion confirmation screen is di splayed (No).

In Step 14, the worker turns off the ignition switch and subsequentlysees a screen for confirmation of the software component number, forexample, “Software Component Number: xxx-xxxx-xx”, on the multi-displayto confirm that there is no problem with rewriting of the control data.

In this way, workers of assembly lines of automobiles are only requiredto give instructions to start rewriting of the control data and toconfirm software component numbers, and the work load is reduced.Accordingly, the process of rewriting the control data can be added tothe assembly line. Furthermore, unlike End Of Line Programming (EOLP),no dedicated rewriting device is necessary because it is only requiredto use existing equipment such as tools connected to the OBD2 port andthe multi-display. This results in a small burden of capital investment.

In the embodiments described above, code flash memory 120 has twostorage areas, but data flash memory 130 may have two storage areas.

Note that those skilled in the art will readily appreciate that varioustechnical ideas of the above embodiments can be omitted, appropriatelycombined, or replaced in part to make another embodiment.

REFERENCE SYMBOL LIST

-   100 Electronic control device-   110 Processor-   120 Code flash memory (nonvolatile memory)

1. An electronic control device comprising an electronically rewritablenonvolatile memory which has first storage area and second storage area,wherein the first storage area stores a control program in which controldata is embedded, and the second storage area stores a plurality ofcontrol data usable for the control program and a rewrite program forrewriting the control data of the control program to one piece ofcontrol data selected from the plurality of control data.
 2. Theelectronic control device according to claim 1, wherein the rewriteprogram selects one piece of control data from the plurality of controldata according to information provided from an outside.
 3. Theelectronic control device according to claim 2, wherein the informationis vehicle information.
 4. The electronic control device according toclaim 1, wherein the second storage area is an area for storing at leastfailure information.
 5. The electronic control device according to claim1, wherein the first and the second storage areas are exclusivelyswitchable between an active state and an inactive state.
 6. Theelectronic control device according to claim 1, wherein if rewriting ofthe control data has been completed, the electronic control devicedeletes the rewrite program and the plurality of control data stored inthe second storage area.
 7. The electronic control device according toclaim 1, wherein if rewriting of the control data has not beensuccessfully completed, the electronic control device executes rewritingof the control data again.
 8. The electronic control device according toclaim 7, wherein if rewriting of the control data has not beensuccessfully completed even after consecutive predetermined times ofexecuting rewriting of the control data, the electronic control devicenotifies that a failure has occurred therein.
 9. The electronic controldevice according to claim 1, wherein a plurality of control datacompatible with an automobile model of a largest number among multipleautomobile models to be equipped with a same electronic control deviceis stored in the second storage area.
 10. A method for setting controldata in an electronic control device comprising an electronicallyrewritable nonvolatile memory which has first storage area and secondstorage area, the first storage area storing a control program in whichcontrol data is embedded, and the second storage area storing aplurality of control data usable for the control program and a rewriteprogram for rewriting the control data of the control program, wherein aprocessor of the electronic control device rewrites the control data ofthe control program to one piece of control data selected from theplurality of control data by the rewrite program.
 11. The method forsetting control data according to claim 10, wherein the processor of theelectronic control device selects one piece of control data from theplurality of control data according to information provided from anoutside by the rewrite program.
 12. The method for setting control dataaccording to claim 11, wherein the information is vehicle information.13. The method for setting control data according to claim 10, whereinthe second storage area is an area for storing at least failureinformation.
 14. The method for setting control data according to claim10, wherein the first and the second storage areas are exclusivelyswitchable between an active state and an inactive state.
 15. The methodfor setting control data according to claim 10, wherein if rewriting ofthe control data has been completed, the processor of the electroniccontrol device deletes the rewrite program and the plurality of controldata stored in the second storage area.
 16. The method for settingcontrol data according to claim 10, wherein if rewriting of the controldata has not been successfully completed, the processor of theelectronic control device executes rewriting of the control data again.17. The method for setting control data according to claim 10, whereinif rewriting of the control data has not been successfully completedeven after consecutive predetermined times of executing rewriting of thecontrol data, the processor of the electronic control device notifiesthat a failure has occurred therein.
 18. The method for setting controldata according to claim 10, wherein a plurality of control datacompatible with an automobile model of a largest number among multipleautomobile models to be equipped with a same electronic control deviceis stored in the second storage area.